package com.zhengjiang.enumtest;

/**
 * @author zhengjiang
 * @version 1.0.0
 * @description
 * @date 2021/5/30
 **/
public class EnumTest {
    private void  judge(SeasonEnum e){
        switch (e){
            case SPRING:
                System.out.println("spring");
                break;
            case SUMMER:
                System.out.println("summer");
                break;
            case FALL:
                System.out.println("fall");
                break;
            case WINTER:
                System.out.println("winter");
                break;
        }
    }

    public static void main(String[] args) {
        EnumTest test = new EnumTest();
        test.judge(SeasonEnum.SPRING);
        for (SeasonEnum e : SeasonEnum.values()){
            System.out.println(e);
        }
        System.out.println(SeasonEnum.SPRING.compareTo(SeasonEnum.SUMMER));

    }
}
